<footer class="footer">
    <div class="foot-con">
        <div class="foot-con_2">
            <a href="/">
                <i class="navIcon home"></i>
                <span class="text">首页</span>
            </a>
            <a href="/category">
                <i class="navIcon sort"></i>
                <span class="text">分类</span>
            </a>
            <a href="/shopcart?userid=u8888">
                <i class="navIcon shop"></i>
                <span class="text">购物车</span>
            </a>
            <a href="/userhome">
                <i class="navIcon member"></i>
                <span class="text">我的</span>
            </a>
        </div>
    </div>
</footer>
<script>
$(document).ready(function(){
    var path=location.pathname
    console.log(location.pathname)
    $(`a[href="${path}"]`).addClass('active')
    
})
</script>